home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 931 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  856 b 

  1. Path: gate.net!pslfl2-19
  2. From: bhutto@gate.net (William Hutto)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Macros in C (Disadvantages?)
  5. Date: 9 Jan 1996 21:34:21 GMT
  6. Organization: CyberGate, Inc.
  7. Message-ID: <4cun0t$1olm@news.gate.net>
  8. References: <4cjluh$gva@kernighan.cs.umass.edu> <821173834.5944@paget.demon.co.uk> <4cthcp$1c0@yarrow.wt.com.au>
  9. NNTP-Posting-Host: pslfl2-19.gate.net
  10. X-Newsreader: News Xpress Version 1.0 Beta #4
  11.  
  12. In article <4cthcp$1c0@yarrow.wt.com.au>,
  13.    bvarley@yarrow.wt.com.au (bruce varley) wrote:
  14. >Here is an a example that illustrates the danger(s) of macros.....
  15. >
  16. >#define A   7
  17. >#define B   4+5
  18. >
  19. >C = A * B.   This will produce  33.  
  20. >
  21.  
  22. This is allowed so instructors can write example programs that demonstrate why 
  23. you should enclose expressions in #define statements inside parentheses.
  24.  
  25. Bill
  26.  
  27. "Whatcha got on?...Your mind?"
  28.